import request from '/@/utils/request';

export function get{{table_info.firstUpperName}}List(query?:Object) {
    return request({
        url: '/api/v1/{{package_info.package}}/{{table_info.camelName}}/list',
        method: 'get',
        params:query
    })
}


export function add{{table_info.firstUpperName}}(data:object) {
    return request({
        url: '/api/v1/{{package_info.package}}/{{table_info.camelName}}/add',
        method: 'post',
        data:data
    })
}


export function edit{{table_info.firstUpperName}}(data:object) {
    return request({
        url: '/api/v1/{{package_info.package}}/{{table_info.camelName}}/edit',
        method: 'put',
        data:data
    })
}


export function delete{{table_info.firstUpperName}}(id:number) {
    return request({
        url: '/api/v1/{{package_info.package}}/{{table_info.camelName}}/del',
        method: 'delete',
        data:{id}
    })
}

export function batchDelete{{table_info.firstUpperName}}(ids:number[]) {
    return request({
        url: '/api/v1/{{package_info.package}}/{{table_info.camelName}}/batchdel',
        method: 'delete',
        data:{ids}
    })
}
